package com.wngz.consumer.controller;

import com.wngz.api.UserApi;
import com.wngz.common.model.dto.user.UserRegisterRequest;
import com.wngz.common.result.BaseResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping
@Slf4j
public class UserController {

    @Resource
    private UserApi userApi;

    @PostMapping("/register")
    public BaseResponse<Long> userRegister(@RequestBody UserRegisterRequest userRegisterRequest){
        return userApi.userRegister(userRegisterRequest);
    }
}
